<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<meta charset="UTF-8">

<link rel="stylesheet"
	href="${pageContext.request.contextPath}/web/base/layui/css/layui.css"
	media="all">
	
<!-- <script type="text/javascript"  -->
<%-- 	src="${pageContext.request.contextPath}/web/base/js/jquery-3.6.0.min.js"></script>	 --%>
	
<script type="text/javascript"
	src="${pageContext.request.contextPath}/web/base/layui/layui.js"></script>
	


<script type="text/javascript"
	src="${pageContext.request.contextPath}/web/base/js/ajax.js"></script>

<script type="text/javascript">
	var $=layui.jquery;
	var form = layui.form;
	var layer = layui.layer;
	var table = layui.table;
	var laypage = layui.laypage;
	var base = {
		app : "${pageContext.request.contextPath}"
	}
	
	function f5(name){
		$(name).click();
	}
	
	function closeThis(){
		layer.close(layer.index)
	}
	
	function setpage(elem,count,curr,limit,jump){
		 laypage.render({
			    elem: elem, 
			    count: count, 
			    limit:limit,
			    limits:[10,20,30,40,50],
			    curr:curr,
			    layout:['count','prev','page','next','limit','skip'],
			    jump:jump
			  });
	}
	function select(){
		var data1={action:"selectdocroom"};
		ajax1(data1,base.app+"/PatientServlet","json",function(data){
			resp = JSON.parse(JSON.stringify(data));
    		var roomlist = resp["roomlist"];
    		var doctorlist=resp["doctorlist"];
    		$.each(roomlist,function(i,dom){
    			var address=dom.roomAddress?dom.roomAddress:'';
    			var html="<option value='"+address+"'>"+address+"</option>";
    			$("#room").append(html);
    		});
    		$.each(doctorlist,function(i,dom){
    			var name=dom.doctorName?dom.doctorName:'';
    			var html="<option value='"+name+"'>"+name+"</option>";
    			$("#doctor").append(html);
    		});
    		form.render();
		});
	}
</script>
